package com.base.cn.platform.os.service.course.note;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.course.CourseBaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 课程笔记
 *
 * @author SK
 * @since 2018-06-19
 **/
@FeignClient(value = CourseBaseService.appName, configuration = FeignAuthConfig.class)
public interface CourseNoteService extends CourseBaseService {

    /**
     * 保存课程笔记
     *
     * @param courseNote 课程笔记
     * @return 课程笔记
     */
    @RequestMapping(contextPath + "/saveCourseNote")
    Map<String, Object> saveCourseNote(@RequestBody Map<String, Object> courseNote);

    /**
     * 查询课程笔记列表
     *
     * @param courseNote  查询条件
     * @param count       数量
     * @param setUser     设置用户
     * @param setCourse   设置课程
     * @param setCatalog  设置章节
     * @param setDescribe 设置描述信息 xx > xx hh:mm:ss
     * @return 课程笔记列表
     */
    @RequestMapping(contextPath + "/findCourseNoteList")
    List<Map<String, Object>> findCourseNoteList(@RequestBody Map<String, Object> courseNote,
                                                 @RequestParam(value = "count", required = false) Integer count,
                                                 @RequestParam("setUser") boolean setUser,
                                                 @RequestParam("setCourse") boolean setCourse,
                                                 @RequestParam("setCatalog") boolean setCatalog,
                                                 @RequestParam("setDescribe") boolean setDescribe);

    /**
     * 查询课程笔记列表
     *
     * @param courseNote  查询条件
     * @param currentPage 第N页
     * @param pageSize    每页数据量
     * @param setUser     设置用户
     * @param setCourse   设置课程
     * @param setCatalog  设置章节
     * @param setDescribe 设置描述信息 xx > xx hh:mm:ss
     * @return 课程笔记列表
     */
    @RequestMapping(contextPath + "/findCourseNotePage")
    Map<String, Object> findCourseNotePage(@RequestBody Map<String, Object> courseNote,
                                           @RequestParam(value = "currentPage", required = false, defaultValue = "1") Integer currentPage,
                                           @RequestParam(value = "pageSize", required = false) Integer pageSize,
                                           @RequestParam("setUser") boolean setUser,
                                           @RequestParam("setCourse") boolean setCourse,
                                           @RequestParam("setCatalog") boolean setCatalog,
                                           @RequestParam("setDescribe") boolean setDescribe);

}
